<!--

/*
* Copyright (C) 2005-2013 University of Sydney
*
* Licensed under the GNU License, Version 3.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.gnu.org/licenses/gpl-3.0.txt
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/

/**
* brief description of file
*
* @author      Tom Murtagh
* @author      Kim Jackson
* @author      Ian Johnson   <ian.johnson@sydney.edu.au>
* @author      Stephen White   <stephen.white@sydney.edu.au>
* @author      Artem Osmakov   <artem.osmakov@sydney.edu.au>
* @copyright   (C) 2005-2013 University of Sydney
* @link        http://Sydney.edu.au/Heurist
* @version     3.1.0
* @license     http://www.gnu.org/licenses/gpl-3.0.txt GNU License 3.0
* @package     Heurist academic knowledge management system
* @subpackage  !!!subpackagename for file such as Administration, Search, Edit, Application, Library
*/

-->
<!--

/**
* editMimetype.html
* A form to edit mime types, or add a new one. It is utilized as pop-up from manageMimetypes
*
* @version 2012.1217
* @author: Artem Osmakov
*
* @copyright (C) 2005-2011 University of Sydney Digital Innovation Unit.
* @link: http://HeuristScholar.org
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @package Heurist academic knowledge management system
* @todo
**/

-->
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Edit mime type</title>

<link rel="stylesheet" type="text/css" href="../../common/css/global.css">

<!-- YUI -->
<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/fonts/fonts-min.css" />
<script type="text/javascript" src="../../external/yui/2.8.2r1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="../../external/yui/2.8.2r1/build/element/element-min.js"></script>
<!--script type="text/javascript" src="../../external/yui/2.8.2r1/build/history/history-min.js"></script!-->
<script type="text/javascript" src="../../external/yui/2.8.2r1/build/json/json-min.js"></script>


<style type="text/css">
.dtyField {
	display: block;
}
.dtyHiddenField {
	display: none;
}
.dtyLabel {
	display: inline-block;
	width: 130px;
	text-align: right;
	padding-right: 3px;
}
.dtyLabel.required {
	color: red;
	font-weight: bold;
}
.dtyLabel.required:before {
	content: "* ";
}
.dtyValue {
	display: inline-block;
}
.help {
	padding-left: 133px;
	padding-bottom: 2px;
}
.actionButtons {
	float:right;
	padding-right: 130px;
}

</style>

</head>

<body>
		<script type="text/javascript" src="../../common/js/utilsUI.js"></script>
		<script src="../../common/php/displayPreferences.php"></script>

		<!-- access to functions about current user
		<script src="loadUserInfoShort.php"></script> -->
		<script type="text/javascript" src="editMimetype.js"></script>

		<script type="text/javascript">

			top.HEURIST.parameters = top.HEURIST.parseParams(location.search);

			var _db = (top.HEURIST.parameters.db? top.HEURIST.parameters.db :
						(top.HEURIST.database.name?top.HEURIST.database.name:''));
			var _recID = top.HEURIST.parameters.recID;

			var _url = top.HEURIST.basePath +'admin/structure/srvMimetypes.php?method=get&db='+_db;

			if(Hul.isnull(_recID)) { _recID = 0; }
			_url = _url + "&recID="+_recID;

			//top.HEURIST.Hul.loadScript(_url, true);
			Hul.loadScript2(this.document, _url); //load information about report schedule
		</script>


<div style="width:580;margin:auto;">
<br/>
<div id="statusMsg"></div>
<div id="detailTypeValues" style="padding:5px;">

	<div class="dtyField">
		<label class="dtyLabel required" for="fxm_Extension">Extension:</label>
		<input id="fxm_Extension" style="width:40;" maxlength="6" />
		<div class="help prompt">
			The file extension, indicates mimetype, icon and some beahviours (several may share same mime type)
		</div>
	</div>
	<div class="dtyField">
		<label class="dtyLabel required" for="fxm_MimeType">Mime type:</label>
		<input id="fxm_MimeType" style="width:400;" maxlength="100" />
		<div class="help prompt">
			The standard mime type string (general type/specific type)
		</div>
	</div>
	<div class="dtyField">
		<label class="dtyLabel" for="fxm_FiletypeName">Description:</label>
		<input id="fxm_FiletypeName" style="width:400;" maxlength="31" />
		<div class="help prompt">
			A textual name for the file type represented by the extension
		</div>
	</div>
	<div class="dtyField">
		<label class="dtyLabel" for="fxm_OpenNewWindow">Open in new window:</label>
		<select class="dtyValue" id="fxm_OpenNewWindow">
			<option value="1">yes</option>
			<option value="0" selected="selected">no</option>
		</select>
		<div class="help prompt">
			Flag if a new window should be opened to display this mimetype
		</div>
	</div>
	<div class="dtyField">
		<label class="dtyLabel" for="fxm_IconFileName">Icon file name:</label>
		<input id="fxm_IconFileName" style="width:400;" maxlength="31" />
		<div class="help prompt">
			Filename of the icon file for this mimetype (shared by several)
		</div>
	</div>
	<div class="dtyField">
		<label class="dtyLabel" for="fxm_ImagePlaceholder">Thumbnail file name:</label>
		<input id="fxm_ImagePlaceholder" style="width:400;" maxlength="63" />
		<div class="help prompt">
			Thumbnail size representation for display, generate from fxm_FiletypeName
		</div>
	</div>

</div>
<br/>
<div id="btn_edits" class="actionButtons">
<input type="button" style="height: 25px; width: 99px" value="Save" onclick="window.mimetypeEditor.save();" />
<input type="button" style="height: 25px; width: 99px" value="Cancel" onclick="window.mimetypeEditor.cancel();" />
</div>
<div id="btn_view" class="actionButtons" style="display:none;padding-right: 240px">
<input type="button" style="height: 25px; width: 99px" value="Close" onclick="window.close(null);" />
</div>
</div>

<script type="text/javascript">

	var mimetypeEditor;

	//
	//  starts initialization on load completion of this window
	//
	function loadHandler(){
		window.mimetypeEditor = new MimetypeEditor();
	}
	YAHOO.util.Event.addListener(window, "load", loadHandler );

</script>


</body>
</html>
